import { ListModel, PageModel } from './common';
// "user": {
//   "education": "学历",
//     "workTime": 143214242134(参加工作时间<Timestamp>),
//     "titleCertificate": "职称证书",
//     "jobQualificationCertificate": "职业资格证书",
//     "remark": "备注"，"PreviousPositions": [{
//     "previousPosition": "曾任职务",
//     "workYears": 3.5(工作年限<Float>)
//   },
//     {
//       "previousPosition": "曾任职务",
//       "workYears": 3.5(工作年限<Float>)
//     },
//     {
//       "previousPosition": "曾任职务",
//       "workYears": 3.5(工作年限<Float>)
//     }]
// }

class UserModel {
  public id: string;
  public username: string;
  public password: string;
  public email: string;
  public phoneNumber: number;
  public realName: string;
  public gender: string;
  public qqNumber: string;
  public birthDate: number;
  public company: string;
  public department: string;
  public province: string;
  public city: string;
  public address: string;
  public postcode: string;
  public lastLoginTime: number;
  public title: string;
  public avatarLink: string;
  public remark: string;
  public isPublic: boolean;
  public enabled: boolean;
  public createAt: number;
  public updateAt: number;
  public cardSetting: string;
  public education: string; // 学历
  public workTime: number; // 参加工作时间
  public titleCertificate: string;//职称证书
  public professionCertificate: string; // 职业资格证书
  public country:string; // "国家
  public resumes: ResumesModel[]
}

class ResumesModel {
  public previousPosition: string; // 曾任职务
  public workYears: string; // 工作年限
}

class UserListModel {
  count: number;
  items: UserModel[];
}

class UserPageModel extends PageModel {
  public data: UserListModel;
}

class UserBasicInfoModel {
  public email: string;
  public phoneNumber: string;
  public realName: string;
}

class UserNameCardModel {
  public address: string;
  public avatarLink: string;
  public cardSetting: string;
  public city: string;
  public company: string;
  public email: string;
  public phoneNumber: string;
  public province: string;
  public realName: string;
  public title: string;
}

class SecurityListModel extends ListModel {
  public items: SecurityModel[];
}

class SecurityPageModel extends PageModel {
  public data: SecurityListModel;
}

class SecurityModel {
  public createAt: number;
  public loginCity: string;
  public loginIp: string;
  public loginTime: number;
  public type: number;
  public updateAt: number;
}

class SimpleSuccessHttpRequestModel {
  public data: boolean
}

export {
  UserModel,
  UserPageModel,
  UserBasicInfoModel,
  UserNameCardModel,
  SecurityPageModel,
  SecurityModel,
  SimpleSuccessHttpRequestModel,
  ResumesModel
};
